# Set the parent directory containing your subdirectories
parent_dir <- "cdnd_data"

# Get a list of subdirectories (non-recursive)
subdirs <- list.dirs(parent_dir, recursive = FALSE)

# Loop over each subdirectory
for (subdir in subdirs) {
  # List all ZIP files in the current subdirectory
  zip_files <- list.files(subdir, pattern = "\\.zip$", full.names = TRUE)
  
  for (zip_file in zip_files) {
    # Unzip the file into the current subdirectory
    unzip(zip_file)

    
  }
}
